
use std::io::BufReader;
use std::fs::File;

use libjpeg::jpeg_decoder::*;

fn main() -> std::io::Result<()> {
    let pic = "ava.jpg";
    let file = File::open(pic)?;
    let mut reader = BufReader::new(file);

    let image = jpeg_decode::data_decode(&mut reader);
    image.to_ppm();

    Ok(())
}
